home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 February / Macworld (1999-02).dmg / Games World / Hot Demos! / DroidWorks demo / dwCD.gob / mission_cog_b0_gear_activate.cog < prev    next >
Text File  |  1998-09-17  |  624b  |  37 lines

  1. # DroidWorks
  2. # gear_active.cog
  3. #
  4. # This cog sends a message to b0_gear.cog when the motor's been activated. 
  5. #
  6. #
  7. # [01/20/98] DGS    Created
  8. #
  9. #
  10. symbols
  11.  
  12. cog        gear_cog
  13. surface        button
  14. message        startup
  15. message        activate
  16. message        user0
  17.  
  18. end
  19.  
  20. # ========================================================================================
  21.  
  22. code
  23. startup:
  24.        SetWallCel(button, 1);
  25. return;
  26.  
  27. activate:
  28.     // send message to gear cog telling it the switch has been hit.
  29.         sendmessage(gear_cog, user0);    
  30.         SetWallCel(button, 0);
  31.     return;
  32. user0:
  33.         SetWallCel(button, 1);
  34.     return;
  35.  
  36. end
  37.